package cn.befory.service.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by befory on 2019/10/14.
 */
public class Menu {
    private Long id;

    private String name;

    private String icon;

    private String url;

    private String flag;

    private List<Menu> childList = new ArrayList<>();

    private boolean hasChildren = false;



    public void add(Menu menu){
        this.childList.add(menu);
    }

    public Long getId() {
        return id;
    }

    public Menu setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Menu setName(String name) {
        this.name = name;
        return this;
    }

    public String getIcon() {
        return icon;
    }

    public Menu setIcon(String icon) {
        this.icon = icon;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public Menu setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getFlag() {
        return flag;
    }

    public Menu setFlag(String flag) {
        this.flag = flag;
        return this;
    }

    public boolean isHasChildren() {
        return hasChildren;
    }

    public Menu setHasChildren(boolean hasChildren) {
        this.hasChildren = hasChildren;
        return this;
    }

    public List<Menu> getChildList() {
        return childList;
    }

    public Menu setChildList(List<Menu> childList) {
        this.childList = childList;
        return this;
    }
}
